﻿using Ellanet.ViewModels;

namespace Ellanet.Windows
{
    public partial class CountDownWindow
    {
        public CountDownWindow(int startNumber, StaticCode.Activity activity)
        {
            InitializeComponent();
            var vm = new CountDownWindowViewModel(startNumber, activity);
            vm.RequestViewClose += vm_RequestViewClose;
            DataContext = vm;
        }

        private void vm_RequestViewClose()
        {
            Dispatcher.Invoke(Close);
        }
    }
}
